package decorator

type StapleFood interface {
	getPrice() float64
	getName() string
}

/////////////////////////////
type Noddle struct {
	name  string
	price float64
}

func CreateNoddle(price float64) StapleFood {
	res := new(Noddle)
	res.name = "拌面"
	res.price = price
	return res
}

func (sf *Noddle) getPrice() float64 {
	return sf.price
}

func (sf *Noddle) getName() string {
	return sf.name
}

/////////////////////////////
type Dumpling struct {
	name  string
	price float64
}

func CreateDumpling(price float64) StapleFood {
	res := new(Dumpling)
	res.name = "水饺"
	res.price = price
	return res
}

func (sf *Dumpling) getPrice() float64 {
	return sf.price
}

func (sf *Dumpling) getName() string {
	return sf.name
}
